<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<!DOCTYPE html>
<html>
<head>
    <title>首页</title>
    <style>
        body { background: #f5f5f5; font-family: 'Microsoft YaHei', Arial, sans-serif; margin: 0; }
        .navbar {
            background-color: #363636; /* Dark gray */
            overflow: hidden;
            padding: 10px 20px;
            display: flex;
            justify-content: flex-end; /* Align items to the right */
            align-items: center;
        }
        .navbar a {
            color: #f2f2f2;
            text-align: center;
            padding: 14px 20px;
            text-decoration: none;
            font-size: 17px;
            transition: background-color 0.3s, color 0.3s;
        }
        .navbar a:hover {
            background-color: #555;
            color: white;
        }
        .container { width: 400px; margin: 50px auto; background: #fff; border-radius: 8px; box-shadow: 0 2px 8px rgba(0,0,0,0.1); padding: 40px; text-align: center; }
        h2 { margin-bottom: 20px; }
        .info { color: #666; margin-top: 20px; }
        a { color: #2196F3; text-decoration: none; margin-top: 20px; display: inline-block; }
    </style>
</head>
<body>
<div class="navbar">
    <a href="xuesheng_course_selection">选课</a>
    <a href="xuesheng_course_records">选课记录</a>
    <a href="xuesheng_personal_center">个人中心</a>
</div>
<div class="container">
    <h2>欢迎来到课程管理系统首页</h2>
    <div class="info">
        <% String username = (String) session.getAttribute("username"); %>
        <% if (username != null) { %>
            当前登录用户：<b><%= username %></b>
        <% } else { %>
            您还未登录，请先<a href="login.jsp">登录</a>
        <% } %>
    </div>
    <a href="logout">退出登录</a>
</div>
</body>
</html> 